<template>
	<view>
		<view class="u-page">
			<u-navbar :is-back="false" title=" ">
				<view class="slot-wrap u-margin-left-26 nav-bar-title">
					幸福一家人
				</view>
			</u-navbar>
		</view>
		<TreeChart :json="treeData" :class="{landscape: 0}" @click-node="clickNode" />

		<u-tabbar :list="list" :mid-button="true"></u-tabbar>
	</view>
</template>

<script>
import TreeChart from "./TreeChart.vue";
import {
	tabBarList
} from '../../../emun/tabBar'
export default {
	components: {
		TreeChart
	},
	data() {
		return {
			current: 0,
			list: tabBarList,
			treeData: {
				name: 'root',
				image_url: "../../static/home/banner.jpg",
				class: ["rootNode"],
				children: [
					{
						name: 'children1',
						image_url: "../../static/home/banner.jpg"
					},
					{
						name: 'children2',
						image_url: "../../static/home/banner.jpg",
						children: [
							{
								name: 'grandchild',
								image_url: "../../static/home/banner.jpg"
							},
							{
								name: 'grandchild2',
								image_url: "../../static/home/banner.jpg"
							},
							{
								name: 'grandchild3',
								image_url: "../../static/home/banner.jpg"
							}
						]
					}
				]
			},
		}
	},
	onLoad() {
		console.log(process.env.VUE_APP_BASE_URL)
	},
	methods: {
		clickNode(node){
			console.log(node)
		}
	}
}
</script>

<style lang="scss" scoped>
.nav-bar-title {
	font-weight: bold;
}
</style>